<<<<<<< HEAD
import request from '@/utils/request'
// 添加学科
export function addSubjectName(data:any){
    return  request ({
        url:'/subjects',
        method:'POST',
        data
    })
}
// 获得学科列表
export function getSubjectList(params:any){
    return  request ({
        url:'/subjects',
        method:'GET',
        params
    })
}
// 修改学科
export function changeSubjectName(data:any){
    return  request ({
        url:`/subjects/${data.id}`,
        method:'PUT',
        data
    })
}
// 删除列表
export function delSubjectList(data:any){
    return  request ({
        url:`/subjects/${data.id}`,
        method:'DELETE',
        data
    })
}
=======
//  @ts-nocheck
import request from '@/utils/request'
import { da } from 'element-plus/es/locale'

// 根据id查学科
export const getSubject = id => {
  return request({
    url: `/subjects/${id}`,
    method: 'GET'
  })
}

// 根据目录id查目录
export const getSubjectTag = id => {
  return request({
    url: `/directorys/${id}`,
    method: 'GET'
  })
}

// 获得所有的简单学科
export const getAllSubjects = () => {
  return request({
    url: '/subjects/simple',
    method: 'GET'
  })
}

// 根据学科id查二级目录
export const twoSubject = id => {
  return request({
    url: '/directorys/simple',
    method: 'GET',
    params: {
      subjectID: id
    }
  })
}

// 根据学科id查标签
export const gettag = id => {
  return request({
    url: '/tags/simple',
    method: 'GET',
    params: {
      subjectID: id
    }
  })
}

//获得所有的学科列表
export const AllSubject = params => {
  return request({
    url: '/subjects',
    method: 'GET',
    params: params
  })
}

// 根据id删除学科
export const delsubject = id => {
  return request({
    url: `/subjects/${id}`,
    method: 'DELETE'
  })
}

// 学科修改
export const changeSubject = (id, data) => {
  return request({
    url: `/subjects/${id}`,
    method: 'PUT',
    data: data
  })
}
>>>>>>> 17f20520287b73030ba0bb0803b5a2e685be3348
